<template>
    <div class="main">  
        <h1>登录成功后见到的主界面</h1>
        <button @click="logout">退出登录</button>
    </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'

const router  = useRouter()

const logout = ()=>{
    //清除登录痕迹
    sessionStorage.clear()
    router.replace('/login')
}
</script>

<style scoped>

</style>